<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="UtenteEditDlg" widgetVar="UtenteEditDialog" modal="true" resizable="false" appendToBody="true" header="#{myBundle.EditUtenteTitle}" closeOnEscape="true">

            <h:form id="UtenteEditForm">

                <h:panelGroup id="display">
                    <p:panelGrid  columns="2" rendered="#{utenteController.selected != null}">

                        <h:outputLabel value="#{myBundle.EditUtenteLabel_idUTENTE}" for="idUTENTE" />
                        <h:outputText id="idUTENTE" value="#{utenteController.selected.idUTENTE}" />

                        <p:outputLabel value="#{myBundle.EditUtenteLabel_email}" for="email" />
                        <p:inputText id="email" value="#{utenteController.selected.email}" title="#{myBundle.EditUtenteTitle_email}" required="true" requiredMessage="#{myBundle.EditUtenteRequiredMessage_email}" size="45" maxlength="45"/>

                        <p:outputLabel value="#{myBundle.EditUtenteLabel_nome}" for="nome" />
                        <p:inputText id="nome" value="#{utenteController.selected.nome}" title="#{myBundle.EditUtenteTitle_nome}" required="true" requiredMessage="#{myBundle.EditUtenteRequiredMessage_nome}" size="255" maxlength="255"/>

                        <p:outputLabel value="#{myBundle.EditUtenteLabel_cognome}" for="cognome" />
                        <p:inputText id="cognome" value="#{utenteController.selected.cognome}" title="#{myBundle.EditUtenteTitle_cognome}" required="true" requiredMessage="#{myBundle.EditUtenteRequiredMessage_cognome}" size="255" maxlength="255"/>

                        <p:outputLabel value="#{myBundle.EditUtenteLabel_password}" for="password" />
                        <p:inputText id="password" value="#{utenteController.selected.password}" title="#{myBundle.EditUtenteTitle_password}" required="true" requiredMessage="#{myBundle.EditUtenteRequiredMessage_password}" size="32" maxlength="32"/>

                        <p:outputLabel value="#{myBundle.EditUtenteLabel_gruppo}" for="gruppo" />
                        <p:inputText id="gruppo" value="#{utenteController.selected.gruppo}" title="#{myBundle.EditUtenteTitle_gruppo}" required="true" requiredMessage="#{myBundle.EditUtenteRequiredMessage_gruppo}" size="45" maxlength="45"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{utenteController.save}" value="#{myBundle.Save}" update="display,:UtenteListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,UtenteEditDialog);"/>
                    <p:commandButton value="#{myBundle.Cancel}" onclick="UtenteEditDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
